-- GENERATED SPELL FOR [Tortured Druid] --


function spell0_12178(pUnit, Event) --@Healing Touch,Heal--
pUnit:FullCastSpellOnTarget(23381,pUnit)
pUnit:RegisterEvent('Sorts_12178', 3000, 1)
end

function spell1_12178(pUnit, Event) --@Moonfire,n/a--
pUnit:FullCastSpellOnTarget(23380,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12178', 12000, 1)
end

function spell2_12178(pUnit, Event) --@Summon Hive\'Ashi Drones,n/a--
pUnit:FullCastSpellOnTarget(21327,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12178', 675, 1)
end

function Sorts_12178(pUnit, Event)
local choix_sorts_12178 = math.random(0, 2)
if choix_sorts_12178 == 0 then
pUnit:RegisterEvent('spell0_12178', 1, 1)
end
if choix_sorts_12178 == 1 then
pUnit:RegisterEvent('spell1_12178', 1, 1)
end
if choix_sorts_12178 == 2 then
pUnit:RegisterEvent('spell2_12178', 1, 1)
end
end

function mob12178_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12178', math.random(1500, 3000), 1)
end

function mob12178_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12178_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12178_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12178, 1, 'mob12178_Action')
RegisterUnitEvent(12178, 2, 'mob12178_Leave')
RegisterUnitEvent(12178, 3, 'mob12178_Kill')
RegisterUnitEvent(12178, 4, 'mob12178_Die')
